package com.test.QtestServer.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.test.QtestServer.mapper.TokenMapper;
import com.test.QtestServer.pojo.Tokens;
import com.test.QtestServer.service.TokenService;

@Service
public class TokenServiceImpl implements TokenService{

    @Autowired
    private TokenMapper tokenMapper;

    @Override
    public void addToken(Integer user_id, String token) {
        tokenMapper.addToken(user_id,token);
    }

    @Override
    public Tokens findActiveToken(String token){
       return tokenMapper.findActiveToken(token); 
    }

}
